package com.emmmya.ocs.config.thymeleaf.Utils;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class Util {
    @Autowired
    private Environment env;

    public String properties(String content) {
        return env.getProperty(content);
    }

    public String strListToString(List<String> strList,String glit){
        StringBuffer buffer = new StringBuffer("");
        for (int i = 0; i < strList.size(); i++) {
            buffer.append(strList.get(i)+glit);
        }
        return buffer.substring(0,buffer.length()-glit.length());
    }

}